Properly check result of g_utf8_get_char_validated()
authorMaks Naumov <maksqwe1@ukr.net>
Sun, 11 Jan 2015 19:27:37 +0000 (11:27 -0800)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 11 Jan 2015 20:46:06 +0000 (15:46 -0500)
commit87d36885ac713badc5187f1d26044dbba9e13309
treeaf468fc95dcd1cf5b67773736afc74a23c225c1c
parent07cf489d2df1fd8e71bfbf8a027876490e6858c6
Properly check result of g_utf8_get_char_validated()

g_utf8_get_char_validated() may return -1 or -2
return type is gunichar(guint32)

Therefore such checks like 'gunichar < 0' or 'gunichar > 0'
are always 'false' or 'true'(except when gunichar == 0).

Signed-off-by: Maks Naumov <maksqwe1@ukr.net>
https://bugzilla.gnome.org/show_bug.cgi?id=742774
gtk/gtkbuilder.c
modules/input/gtkimcontextthai.c